<!--
内容：招聘职位
作者：段竟成
日期： 20170706
-->

<template>
    <div class="position-recruitPosition">
        <Tabs value="name1">
            <Tab-pane label="目前在招" name="name1">
                <!--职位总数-->
                <div class="">
                    <div class="float_left">共<span>30</span>个</div>
                    <Input v-model="value" placeholder="职位名称，多个可用分号隔开" style="width: 215px">
                        <Icon type="ios-search" slot="prepend"></Icon>
                    </Input>
                    <Button type="primary" icon="plus" class="btn-issue">发布职位</Button>
                </div>
                <!--文章列表-->
                <div class="margin_top_20">
                    <Table :columns="columns1" :data="positionList"></Table>
                </div>
                <!--分页-->
                <div class="page_center">
                    <Page :total="positionListCount" @on-change="pageChangeAction" show-elevator></Page>
                </div>
            </Tab-pane>
            <Tab-pane label="已关闭" name="name2">已关闭</Tab-pane>
        </Tabs>
    </div>
</template>

<script>
    import expandRow from './child/positionListExpand'

    export default {
        data: function () {
            return {
                // 表格thead
                columns1: [
                    {
                        type: 'expand',
                        width: 50,
                        render: (h, params) => {
                            return h(expandRow, {
                                props: {
                                    row: params.row
                                }
                            })
                        }
                    },
                    {
                        title: '职位名称',
                        key: 'jobTitle',
                    },
                    {
                        title: '用人部门',
                        key: 'department',
                        ellipsis: true,
                    },
                    {
                        title: '需求人数',
                        key: 'needs'
                    },
                    {
                        title: '已入职',
                        key: 'entried'
                    },
                    {
                        title: '待入职',
                        key: 'forEntry'
                    },
                    {
                        title: '发布日期',
                        key: 'issueDate'
                    },
                    {
                        title: '期望到岗时间',
                        key: 'expectedArrivalTime'
                    },
                    {
                        title: '待筛选简历',
                        key: 'forFilterResume',

                    }
                ],
                positionList:[
                    {
                        jobTitle: '产品经理',
                        department: '新产品中心',
                        needs: 4,
                        entried: 0,
                        forEntry: 2,
                        issueDate: '2017-05-14',
                        expectedArrivalTime: '2017-05-30',
                        forFilterResume: 12,
                    },
                    {
                        jobTitle: '产品经理',
                        department: '新产品中心',
                        needs: 4,
                        entried: 0,
                        forEntry: 2,
                        issueDate: '2017-05-14',
                        expectedArrivalTime: '2017-05-30',
                        forFilterResume: 12,
                    },
                    {
                        jobTitle: '产品经理',
                        department: '新产品中心',
                        needs: 4,
                        entried: 0,
                        forEntry: 2,
                        issueDate: '2017-05-14',
                        expectedArrivalTime: '2017-05-30',
                        forFilterResume: 12,
                    },
                    {
                        jobTitle: '产品经理',
                        department: '新产品中心',
                        needs: 4,
                        entried: 0,
                        forEntry: 2,
                        issueDate: '2017-05-14',
                        expectedArrivalTime: '2017-05-30',
                        forFilterResume: 12,
                    },
                ],
                // 当前页面数
                currentPage:1,
                // 招聘职位总数
                positionListCount: 100
            }
        },
        mounted: function () {

        },
        methods: {
            // 分页
            pageChangeAction: function () {

            }
        },
        components: {}
    }
</script>

<style scoped lang="scss">
    .position-recruitPosition{
        padding: 0 20px;
        .btn-issue{
            position: absolute;
            right: 0;
            top: 0;
        }
        .ivu-input-group{
            top: 0;
        }
    }
</style>
